import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
const env:string = process.env.NODE_ENV
// https://vitejs.dev/config/
export default defineConfig({
  base:  env=== "production" ? "/vue3-vite/" : "./",
  resolve:{
    alias:{
      "@": path.resolve(__dirname,'./src')
    }
  },
  css: {
    preprocessorOptions: {
        less: {
            modifyVars: {
                hack: `true; @import (reference) "${path.resolve("src/assets/css/base.less")}";`,
            },
            javascriptEnabled: true,
        },
    },
},
  plugins: [vue()],
  server:{
    port: 5730
  }
})
